<%@ page language="java" pageEncoding="UTF-8" contentType="text/html; charset=utf-8" errorPage="/error.jsp" isELIgnored="false" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles" prefix="tiles" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://www.opensymphony.com/oscache" prefix="cache" %>
<%@ taglib uri="http://atleap.blandware.com/taglib" prefix="atleap" %>
<html:xhtml />

<atleap:constants className="com.blandware.atleap.webapp.util.core.WebappConstants" var="SITE_EDIT_MODE_ENABLED_KEY" />
<atleap:constants className="com.blandware.atleap.webapp.struts.ContentTilesRequestProcessor" var="PROCESSED_URL" />

<atleap:rewriteUrl action="core/switchEditMode" var="actionUrl" />
<form method="POST" action="${actionUrl}" onsubmit="disableButtons(this, true);">
	<atleap:message key="core.commons.buttons.enable" var="editModeMsg" />
	<c:if test="${!empty sessionScope[pageScope.SITE_EDIT_MODE_ENABLED_KEY]}">
		<%-- already in EditMode --%>
		<atleap:message key="core.commons.buttons.disable" var="editModeMsg" />
	</c:if>
    <input type="hidden" name="redirectUrl" value="${requestScope[pageScope.PROCESSED_URL]}" />

	<c:if test="${!empty sessionScope[pageScope.SITE_EDIT_MODE_ENABLED_KEY]}">
		<div align="center" style="font-size: 11px;">
			<atleap:message key="core.editMode.helpTip" />
		</div>
	</c:if>
	<div align="center">
		<input type="submit" value="${editModeMsg}" class="button" />
	</div>
</form>
